home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / cdbw.zip / SAMPLE.H < prev    next >
Text File  |  1991-05-15  |  3KB  |  93 lines

  1. /*
  2.  *  SAMPLE.H
  3.  *
  4.  *  Copyright (C) 1991 by Daytris.  All rights reserved.
  5.  */
  6.  
  7. /* Database record typedefs */
  8. typedef struct client CLIENT;
  9. typedef struct address ADDRESS;
  10. typedef struct setup SETUP;
  11.  
  12. /* menu defines */
  13. #define IDM_EXIT            200
  14. #define IDM_ABOUT           210
  15. #define IDM_ADD             220
  16. #define IDM_UPDATE          230
  17. #define IDM_DELETE          240
  18. #define IDM_SORT_BY_NUMBER  250
  19. #define IDM_SORT_BY_NAME    260
  20.  
  21. /* main window dialog defines */
  22. #define IDC_CLIENT_LISTBOX  100
  23.  
  24. /* client window dialog defines */
  25. #define IDC_CLIENT_INFO     100
  26. #define IDC_NUMBER          110
  27. #define IDC_NAME            120
  28. #define IDC_DESC            130
  29. #define IDC_BALANCE         140
  30. #define IDC_EDIT_NUMBER     150
  31. #define IDC_EDIT_NAME       160
  32. #define IDC_EDIT_DESC       170
  33. #define IDC_EDIT_BALANCE    180
  34. #define IDC_ADDR_INFO       190
  35. #define IDC_ADDR_LISTBOX    200
  36. #define IDC_ADD_ADDR        210
  37. #define IDC_UPDATE_ADDR     220
  38. #define IDC_DELETE_ADDR     230
  39.  
  40. /* address window dialog defines */
  41. #define IDC_STREET          100
  42. #define IDC_CITY            110
  43. #define IDC_STATE           120
  44. #define IDC_ZIP             130
  45. #define IDC_TEL             140
  46. #define IDC_FAX             150
  47. #define IDC_EDIT_STREET     160
  48. #define IDC_EDIT_CITY       170
  49. #define IDC_EDIT_STATE      180
  50. #define IDC_EDIT_ZIP        190
  51. #define IDC_EDIT_TEL        200
  52. #define IDC_EDIT_FAX        210
  53.  
  54. /* Client listbox defines */
  55. #define LISTBOX_X       2
  56. #define LISTBOX_Y       2
  57. #define LISTBOX_LENGTH  8
  58. #define LISTBOX_WIDTH   47
  59. #define WINDOW_LENGTH   (LISTBOX_LENGTH + LISTBOX_Y)
  60. #define WINDOW_WIDTH    (LISTBOX_WIDTH + (LISTBOX_X * 2))
  61.  
  62. /* Data declarations */
  63. extern HANDLE hInst;
  64. extern HANDLE hDb;
  65. extern HWND hWndClientLB;
  66. extern BOOL bSortByNumber;
  67. extern SETUP setup;
  68.  
  69. /* sclient.c */
  70. BOOL AddClientDlg( HWND hWnd);
  71. BOOL UpdateClientDlg( HWND hWnd);
  72. BOOL DeleteClientDlg( HWND hWnd);
  73.  
  74. /* saddress.c */
  75. BOOL AddAddressDlg( HWND hWnd);
  76. BOOL UpdateAddressDlg( HWND hWnd);
  77. BOOL DeleteAddressDlg( HWND hWnd);
  78.  
  79. /* sabout.c */
  80. void AboutDlg( HWND hWnd);
  81.  
  82. /* slistbox.c */
  83. BOOL LoadClientListBox( HWND hWnd);
  84. BOOL AddToClientListBox( HWND hWnd, CLIENT *pClient);
  85. BOOL DeleteFromClientListBox( HWND hWnd, short nIndex);
  86. BOOL LoadAddressListBox( HWND hWnd);
  87. BOOL AddToAddressListBox( HWND hWnd, ADDRESS FAR *lpAddress);
  88. BOOL DeleteFromAddressListBox( HWND hWnd, short nIndex);
  89. HANDLE GetAddressHandle( HWND hWnd, short nIndex);
  90.  
  91. /* serror.c */
  92. void DbError( HWND hWnd, DWORD dwError, PSTR pFile, WORD wLineNbr);
  93.